# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=kio
pkgver=5.50.0
pkgrel=1
pkgdesc='Resource and network access abstraction'
arch=(x86_64)
url='https://community.kde.org/Frameworks'
license=(LGPL)
depends=(solid kjobwidgets kbookmarks libxslt kwallet desktop-file-utils qt5-script)
makedepends=(extra-cmake-modules kdoctools doxygen qt5-tools)
optdepends=('kio-extras: extra protocols support (sftp, fish and more)' 'kdoctools: for the help kioslave'
            'knetattach: to add new kio-remote entries')
groups=(kf5)
source=("https://download.kde.org/stable/frameworks/${pkgver%.*}/$pkgname-$pkgver.tar.xz"{,.sig})
sha256sums=('01423f94668756dc9f644c5ef93ace0b2e1624d7dd9483f9524bdf3c0855d2ae'
            'SKIP')
validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_INSTALL_LIBEXECDIR=lib \
    -DBUILD_TESTING=OFF \
    -DBUILD_QCH=ON
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
